<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>The Yaf_Config_Simple class</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="yaf-config-ini.valid.html">« Yaf_Config_Ini::valid</a></li>
      <li style="float: right;"><a href="yaf-config-simple.construct.html">Yaf_Config_Simple::__construct »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="book.yaf.html">Yaf</a></li>
    <li>The Yaf_Config_Simple class</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="class.yaf-config-simple" class="reference">

 <h1 class="title">The Yaf_Config_Simple class</h1>
 

 <div class="partintro"><p class="verinfo">(Yaf &gt;=1.0.0)</p>


  <div class="section" id="yaf-config-simple.intro">
   <h2 class="title">简介</h2>
   <p class="para">
       Yaf_Config_Simple 是 Yad_Config_ini 的简洁版本，只允许传入数组进行初始化，并提供了设置readonly的参数。
   </p>
  </div>


  <div class="section" id="yaf-config-simple.synopsis">
   <h2 class="title">类摘要</h2>


   <div class="classsynopsis">
    <div class="ooclass"></div>


    <div class="classsynopsisinfo">
     <span class="ooclass">
      <span class="modifier">class</span> <strong class="classname">Yaf_Config_Simple</strong>
     </span>
     
     <span class="ooclass">
      <span class="modifier">extends</span>
       <a href="class.yaf-config-abstract.html" class="classname">Yaf_Config_Abstract</a>
     </span>
     
     <span class="oointerface"><span class="modifier">implements</span> 
       <a href="class.iterator.html" class="interfacename">Iterator</a></span><span class="oointerface">,  <a href="class.traversable.html" class="interfacename">Traversable</a></span><span class="oointerface">,  <a href="class.arrayaccess.html" class="interfacename">ArrayAccess</a></span><span class="oointerface">,  <a href="class.countable.html" class="interfacename">Countable</a></span> {</div>

    <div class="classsynopsisinfo classsynopsisinfo_comment">/* 属性 */</div>
    <div class="fieldsynopsis">
     <span class="modifier">protected</span>
      <var class="varname"><a href="class.yaf-config-simple.html#yaf-config-simple.props.readonly">$<var class="varname">_readonly</var></a></var>;</div>


    
    <div class="classsynopsisinfo classsynopsisinfo_comment">/* 方法 */</div>
    <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><a href="yaf-config-simple.construct.html" class="methodname">__construct</a></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$config_file</code></span>, <span class="methodparam"><span class="type">string</span> <code class="parameter">$section</code><span class="initializer"> = ?</span></span>)</div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="yaf-config-simple.count.html" class="methodname">count</a></span>(): <span class="type"><span class="type void">void</span></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="yaf-config-simple.current.html" class="methodname">current</a></span>(): <span class="type"><span class="type void">void</span></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="yaf-config-simple.get.html" class="methodname">__get</a></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$name</code><span class="initializer"> = ?</span></span>): <span class="type"><span class="type void">void</span></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="yaf-config-simple.isset.html" class="methodname">__isset</a></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$name</code></span>): <span class="type"><span class="type void">void</span></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="yaf-config-simple.key.html" class="methodname">key</a></span>(): <span class="type"><span class="type void">void</span></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="yaf-config-simple.next.html" class="methodname">next</a></span>(): <span class="type"><span class="type void">void</span></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="yaf-config-simple.offsetexists.html" class="methodname">offsetExists</a></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$name</code></span>): <span class="type"><span class="type void">void</span></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="yaf-config-simple.offsetget.html" class="methodname">offsetGet</a></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$name</code></span>): <span class="type"><span class="type void">void</span></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="yaf-config-simple.offsetset.html" class="methodname">offsetSet</a></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$name</code></span>, <span class="methodparam"><span class="type">string</span> <code class="parameter">$value</code></span>): <span class="type"><span class="type void">void</span></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="yaf-config-simple.offsetunset.html" class="methodname">offsetUnset</a></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$name</code></span>): <span class="type"><span class="type void">void</span></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="yaf-config-simple.readonly.html" class="methodname">readonly</a></span>(): <span class="type"><span class="type void">void</span></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="yaf-config-simple.rewind.html" class="methodname">rewind</a></span>(): <span class="type"><span class="type void">void</span></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="yaf-config-simple.set.html" class="methodname">__set</a></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$name</code></span>, <span class="methodparam"><span class="type">string</span> <code class="parameter">$value</code></span>): <span class="type"><span class="type void">void</span></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="yaf-config-simple.toarray.html" class="methodname">toArray</a></span>(): <span class="type"><span class="type void">void</span></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="yaf-config-simple.valid.html" class="methodname">valid</a></span>(): <span class="type"><span class="type void">void</span></span></div>

    
    <div class="classsynopsisinfo classsynopsisinfo_comment">/* 继承的方法 */</div>
    <div class="methodsynopsis dc-description"><span class="modifier">abstract</span> <span class="modifier">public</span> <span class="methodname"><a href="yaf-config-abstract.get.html" class="methodname">Yaf_Config_Abstract::get</a></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$name</code></span>, <span class="methodparam"><span class="type"><a href="language.types.declarations.html#language.types.declarations.mixed" class="type mixed">mixed</a></span> <code class="parameter">$value</code></span>): <span class="type"><a href="language.types.declarations.html#language.types.declarations.mixed" class="type mixed">mixed</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">abstract</span> <span class="modifier">public</span> <span class="methodname"><a href="yaf-config-abstract.readonly.html" class="methodname">Yaf_Config_Abstract::readonly</a></span>(): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">abstract</span> <span class="modifier">public</span> <span class="methodname"><a href="yaf-config-abstract.set.html" class="methodname">Yaf_Config_Abstract::set</a></span>(): <span class="type"><a href="class.yaf-config-abstract.html" class="type Yaf_Config_Abstract">Yaf_Config_Abstract</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">abstract</span> <span class="modifier">public</span> <span class="methodname"><a href="yaf-config-abstract.toarray.html" class="methodname">Yaf_Config_Abstract::toArray</a></span>(): <span class="type">array</span></div>


   }</div>
    
   
   </div>

  

  <div class="section" id="yaf-config-simple.props">
   <h2 class="title">属性</h2>
   <dl>
    
     <dt id="yaf-config-simple.props.config"><var class="varname">_config</var></dt>

     <dd>

      <p class="para"/>
     </dd>

    
    
     <dt id="yaf-config-simple.props.readonly"><var class="varname">_readonly</var></dt>

     <dd>

      <p class="para"/>
     </dd>

    
   </dl>

  </div>



 </div>

 

















































































































<h2>目录</h2><ul class="chunklist chunklist_reference"><li><a href="yaf-config-simple.construct.html">Yaf_Config_Simple::__construct</a> — 构造函数</li><li><a href="yaf-config-simple.count.html">Yaf_Config_Simple::count</a> — 返回配置的节数量</li><li><a href="yaf-config-simple.current.html">Yaf_Config_Simple::current</a> — 返回当前节点</li><li><a href="yaf-config-simple.get.html">Yaf_Config_Simple::__get</a> — 读取节点配置</li><li><a href="yaf-config-simple.isset.html">Yaf_Config_Simple::__isset</a> — 检查节点是否存在</li><li><a href="yaf-config-simple.key.html">Yaf_Config_Simple::key</a> — 返回当前元素的键</li><li><a href="yaf-config-simple.next.html">Yaf_Config_Simple::next</a> — 向前移动到下一个元素</li><li><a href="yaf-config-simple.offsetexists.html">Yaf_Config_Simple::offsetExists</a> — 检查一个偏移位置是否存在</li><li><a href="yaf-config-simple.offsetget.html">Yaf_Config_Simple::offsetGet</a> — 获取一个偏移位置的值</li><li><a href="yaf-config-simple.offsetset.html">Yaf_Config_Simple::offsetSet</a> — 设置一个偏移位置的值</li><li><a href="yaf-config-simple.offsetunset.html">Yaf_Config_Simple::offsetUnset</a> — 复位一个偏移位置的值</li><li><a href="yaf-config-simple.readonly.html">Yaf_Config_Simple::readonly</a> — 检查配置是否只读</li><li><a href="yaf-config-simple.rewind.html">Yaf_Config_Simple::rewind</a> — 检查当前位置是否有效</li><li><a href="yaf-config-simple.set.html">Yaf_Config_Simple::__set</a> — 设置节点配置</li><li><a href="yaf-config-simple.toarray.html">Yaf_Config_Simple::toArray</a> — 转换为数组的格式</li><li><a href="yaf-config-simple.valid.html">Yaf_Config_Simple::valid</a> — 检查迭代器是否有效</li></ul>
</div>
</div></div></body></html>